#ifndef IVI_IOCTL_H
#define IVI_IOCTL_H

#include "ivi_config.h"

struct map_info {
	unsigned short oldp;
	unsigned short newp;
	unsigned char xlated;
	unsigned char proto;
};

#define IVI_DEVNAME	"ivi"

#define IVI_IOCTL	324

#define IVI_IOC_START	_IO(IVI_IOCTL, 0x12)
#define IVI_IOC_STOP	_IO(IVI_IOCTL, 0x13)

#define IVI_IOC_V4NET	_IOW(IVI_IOCTL, 0x14, int)
#define IVI_IOC_V4MASK	_IOW(IVI_IOCTL, 0x15, int)
#define IVI_IOC_V6NET	_IOW(IVI_IOCTL, 0x16, int)
#define IVI_IOC_V6MASK	_IOW(IVI_IOCTL, 0x17, int)

#define IVI_IOC_POSTFIX	_IOW(IVI_IOCTL, 0x1b, int)
#define IVI_IOC_SUFFIX	_IOW(IVI_IOCTL, 0x1c, int)

#define IVI_IOC_MSS_LIMIT	_IOW(IVI_IOCTL, 0x1d, int)

#define IVI_IOC_ADJACENT	_IOW(IVI_IOCTL, 0x20, int)

#define IVI_IOC_ADD_RULE	_IOW(IVI_IOCTL, 0x21, int)

#define IVI_IOC_ADD_MAP	_IOW(IVI_IOCTL, 0x30, int)


#ifdef __KERNEL__

#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/fs.h>
#include <linux/netdevice.h>
#include <linux/uaccess.h>
#include "ivi_nf.h"
#include "ivi_xmit.h"
#include "ivi_map.h"
#include "ivi_map_tcp.h"
#include "ivi_rule.h"
#include "ivi_rule6.h"

extern int ivi_ioctl_init(void);
extern void ivi_ioctl_exit(void);

#endif

#endif /* IVI_IOCTL_H */
